#region Using Statements
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace mirror
{
    /// <summary>
    /// Custom particle system for creating the fiery part of the explosions.
    /// </summary>
    class ExplosionParticleSystem3D : ParticleSystem3D
    {
        public ExplosionParticleSystem3D()
        { }


        protected override void InitializeSettings(ParticleSettings3D settings)
        {
            settings.TextureName = "particles3d/explosion";

            float multiplier = 0.1f;
            float durationMultiplier = 0.5f;
            settings.MaxParticles = 5;

            settings.Duration = TimeSpan.FromSeconds(2* durationMultiplier);
            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 20 * multiplier ;
            settings.MaxHorizontalVelocity = 30 * multiplier;

            settings.MinVerticalVelocity = -20 * multiplier;
            settings.MaxVerticalVelocity = 20 * multiplier;

            settings.EndVelocity = 0;

            settings.MinColor = Color.DarkGray;
            settings.MaxColor = Color.Gray;

            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;

            settings.MinStartSize = 5 * multiplier;
            settings.MaxStartSize = 5 * multiplier;

            settings.MinEndSize = 20 * multiplier;
            settings.MaxEndSize = 40 * multiplier;

            // Use additive blending.
            settings.BlendState = BlendState.Additive; 
        }
    }
}
